﻿namespace ExpressManagement.Areas.BackSys.ServiceTools
{
    public static class MyHttpContext
    {
        public static IServiceProvider ServiceProvider;
        public static Microsoft.AspNetCore.Http.HttpContext? Current
        {
            get
            {
                object? factory = ServiceProvider.GetService(typeof(Microsoft.AspNetCore.Http.IHttpContextAccessor));
                Microsoft.AspNetCore.Http.HttpContext? context = ((HttpContextAccessor)factory).HttpContext;
                return context;
            }
        }

    }
}
